package org.example.factory;

import org.example.service.OpenFeignClient;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class OpenFeignFallbackFactory implements FallbackFactory<OpenFeignClient> {
    @Override
    public OpenFeignClient create(Throwable cause) {
        return new OpenFeignClient() {
            @Override
            public String testOpenFeign() {
                return "ERROR";
            }
        };
    }
}
